Skip to content

Commit dcc47ae

Browse files
committed
chore(@ldclabs/anda_x402): update dependencies
1 parent 72248d9 commit dcc47ae

File tree

4 files changed

+13
-29
lines changed

4 files changed

+13
-29
lines changed

examples/ts/anda_x402/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@dfinity/identity": ">=3.2.0",
2424
"@dfinity/principal": ">=3.2.0",
2525
"@ldclabs/anda_x402": "../../../ts/anda_x402",
26-
"@ldclabs/ic-auth": "^0.1.2",
26+
"@ldclabs/ic-auth": "^0.2.0",
2727
"@noble/hashes": "^1.8.0",
2828
"cborg": ">=4.2.0"
2929
},

pnpm-lock.yaml

Lines changed: 7 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ts/anda_x402/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ldclabs/anda_x402",
3-
"version": "0.1.3",
3+
"version": "0.2.0",
44
"type": "module",
55
"description": "The Typescript version of the client SDK for the Anda x402.",
66
"license": "MIT",
@@ -33,7 +33,7 @@
3333
"ncu": "npx npm-check-updates -u"
3434
},
3535
"dependencies": {
36-
"@ldclabs/ic-auth": "^0.1.2"
36+
"@ldclabs/ic-auth": "^0.2.0"
3737
},
3838
"peerDependencies": {
3939
"@dfinity/agent": ">=3.2.0",

ts/anda_x402/src/x402.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type {
1919
} from './types.js'
2020
import {
2121
toDelegationIdentity,
22-
signCborMessage,
22+
signMessage,
2323
deterministicEncode,
2424
bytesToBase64Url
2525
} from '@ldclabs/ic-auth'
@@ -73,8 +73,8 @@ export class X402Canister {
7373
}
7474

7575
async signPayload(data: IcpPayloadAuthorization): Promise<string> {
76-
const sig = await signCborMessage(this.#identity, data)
77-
delete sig.h
76+
const sig = await signMessage(this.#identity, data)
77+
delete sig.h // remove 'h' field as it's not needed for verification
7878
return bytesToBase64Url(deterministicEncode(sig))
7979
}
8080

0 commit comments

Comments
 (0)