Skip to content

Commit

Permalink
[kms] inline aws4fetch (#20201)
Browse files Browse the repository at this point in the history
## Description 

Describe the changes or additions included in this PR.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
hayes-mysten authored Dec 6, 2024
1 parent 0de36fc commit e0885ca
Show file tree
Hide file tree
Showing 17 changed files with 551 additions and 48 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-beds-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@mysten/signers': minor
---

renamed package to @mysten/signers and inlines aws4fetch
77 changes: 36 additions & 41 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ packages:
- '!sdk/typescript/keypairs/secp256r1'
- '!sdk/typescript/graphql/schemas/2024.1'
- '!sdk/typescript/graphql/schemas/2024.4'
- '!sdk/kms/aws'
- '!sdk/signers/aws'
File renamed without changes.
2 changes: 1 addition & 1 deletion sdk/kms/CHANGELOG.md → sdk/signers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @mysten/kms
# @mysten/signers

## 0.0.10

Expand Down
2 changes: 1 addition & 1 deletion sdk/kms/README.md → sdk/signers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The AWS KMS Signer allows you to leverage AWS's Key Management Service to sign S
### Usage

```typescript
import { AwsKmsSigner } from '@mysten/kms/aws';
import { AwsKmsSigner } from '@mysten/signers/aws';

const prepareSigner = async () => {
const { AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, AWS_KMS_KEY_ID } = process.env;
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions sdk/kms/package.json → sdk/signers/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@mysten/kms",
"name": "@mysten/signers",
"version": "0.0.10",
"description": "A collection of KMS signers for various cloud providers",
"license": "Apache-2.0",
Expand Down Expand Up @@ -43,15 +43,15 @@
"devDependencies": {
"@mysten/build-scripts": "workspace:*",
"@types/node": "^20.14.10",
"dotenv": "^16.4.5",
"typescript": "^5.5.3",
"vitest": "^2.0.1"
},
"dependencies": {
"@mysten/sui": "workspace:*",
"@noble/curves": "^1.4.2",
"@noble/hashes": "^1.4.0",
"asn1-ts": "^8.0.2",
"aws4fetch": "^1.0.20"
"asn1-ts": "^8.0.2"
},
"engines": {
"node": ">=20"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Secp256k1PublicKey } from '@mysten/sui/keypairs/secp256k1';
import { Secp256r1PublicKey } from '@mysten/sui/keypairs/secp256r1';
import { fromBase64 } from '@mysten/sui/utils';
import { ASN1Construction, ASN1TagClass, DERElement } from 'asn1-ts';
import { AwsClient } from 'aws4fetch';

import { AwsClient } from './aws4fetch.js';
import { compressPublicKeyClamped } from './utils.js';

interface KmsCommands {
Expand Down
File renamed without changes.
Loading

0 comments on commit e0885ca

Please sign in to comment.