@novasamatech/host-api 0.9.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hostApi.js +87 -3
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4 -1
- package/dist/protocol/callError.d.ts +63 -0
- package/dist/protocol/callError.js +57 -0
- package/dist/protocol/impl.d.ts +349 -54
- package/dist/protocol/impl.js +70 -10
- package/dist/protocol/messageCodec.d.ts +820 -109
- package/dist/protocol/v1/accounts.d.ts +10 -10
- package/dist/protocol/v1/accounts.js +12 -11
- package/dist/protocol/v1/chainInteraction.d.ts +44 -12
- package/dist/protocol/v1/chainInteraction.js +25 -15
- package/dist/protocol/v1/chat.d.ts +3 -3
- package/dist/protocol/v1/chat.js +5 -4
- package/dist/protocol/v1/coinPayment.d.ts +345 -0
- package/dist/protocol/v1/coinPayment.js +105 -0
- package/dist/protocol/v1/createTransaction.d.ts +9 -9
- package/dist/protocol/v1/createTransaction.js +4 -3
- package/dist/protocol/v1/deriveEntropy.d.ts +1 -1
- package/dist/protocol/v1/deriveEntropy.js +2 -2
- package/dist/protocol/v1/devicePermission.d.ts +1 -1
- package/dist/protocol/v1/devicePermission.js +3 -2
- package/dist/protocol/v1/feature.d.ts +1 -1
- package/dist/protocol/v1/feature.js +3 -2
- package/dist/protocol/v1/handshake.d.ts +1 -1
- package/dist/protocol/v1/handshake.js +3 -2
- package/dist/protocol/v1/localStorage.d.ts +10 -3
- package/dist/protocol/v1/localStorage.js +10 -4
- package/dist/protocol/v1/navigation.d.ts +1 -1
- package/dist/protocol/v1/navigation.js +3 -2
- package/dist/protocol/v1/notification.d.ts +2 -2
- package/dist/protocol/v1/notification.js +4 -3
- package/dist/protocol/v1/payments.d.ts +8 -8
- package/dist/protocol/v1/payments.js +4 -3
- package/dist/protocol/v1/preimage.d.ts +1 -1
- package/dist/protocol/v1/preimage.js +3 -2
- package/dist/protocol/v1/remotePermission.d.ts +1 -1
- package/dist/protocol/v1/remotePermission.js +3 -2
- package/dist/protocol/v1/resourceAllocation.d.ts +1 -1
- package/dist/protocol/v1/resourceAllocation.js +3 -2
- package/dist/protocol/v1/sign.d.ts +4 -4
- package/dist/protocol/v1/sign.js +6 -5
- package/dist/protocol/v1/statementStore.d.ts +3 -3
- package/dist/protocol/v1/statementStore.js +5 -4
- package/dist/protocol/v1/worker.d.ts +37 -0
- package/dist/protocol/v1/worker.js +20 -0
- package/dist/transport.js +16 -2
- package/dist/transport.spec.js +18 -0
- package/package.json +2 -2
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
export declare const CoinPaymentPurseId: import("scale-ts").Codec<number>;
|
|
2
|
+
export declare const CoinPaymentBalance: import("scale-ts").Codec<number>;
|
|
3
|
+
export declare const CoinPaymentTimestamp: import("scale-ts").Codec<bigint>;
|
|
4
|
+
export declare const CoinPaymentProductId: import("scale-ts").Codec<string>;
|
|
5
|
+
export declare const CoinPaymentReceivable: import("@novasamatech/scale").HexCodec<number>;
|
|
6
|
+
export declare const CoinPaymentMerkleRoot: import("@novasamatech/scale").HexCodec<number>;
|
|
7
|
+
export declare const CoinPaymentTransactionHash: import("@novasamatech/scale").HexCodec<number>;
|
|
8
|
+
export declare const CoinPaymentCoinagePubKey: import("@novasamatech/scale").HexCodec<number>;
|
|
9
|
+
export declare const CoinPaymentPurseInfo: import("scale-ts").Codec<{
|
|
10
|
+
name: string;
|
|
11
|
+
created: bigint;
|
|
12
|
+
creator: string;
|
|
13
|
+
balance: number;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const CoinPaymentCheque: import("scale-ts").Codec<{
|
|
16
|
+
id: `0x${string}`;
|
|
17
|
+
amount: number;
|
|
18
|
+
encryptedSecrets: `0x${string}`;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const CoinPaymentErrorValue: import("scale-ts").Codec<"Denied" | "BalanceLow" | "BadCoins" | "SnipedCoins" | "PurseNotFound" | "ReceivableNotFound" | "UnsupportedChannel" | "UserAgentCapabilityUnavailable" | "Internal">;
|
|
21
|
+
export declare const CoinPaymentErr: [import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>, import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>] & {
|
|
22
|
+
enc: import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
23
|
+
dec: import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
24
|
+
} & {
|
|
25
|
+
readonly BalanceLow: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BalanceLow">;
|
|
26
|
+
readonly Denied: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Denied">;
|
|
27
|
+
readonly BadCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BadCoins">;
|
|
28
|
+
readonly SnipedCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::SnipedCoins">;
|
|
29
|
+
readonly PurseNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::PurseNotFound">;
|
|
30
|
+
readonly ReceivableNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::ReceivableNotFound">;
|
|
31
|
+
readonly UnsupportedChannel: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UnsupportedChannel">;
|
|
32
|
+
readonly UserAgentCapabilityUnavailable: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable">;
|
|
33
|
+
readonly Internal: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Internal">;
|
|
34
|
+
} & {
|
|
35
|
+
[Symbol.hasInstance](v: unknown): v is import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">;
|
|
36
|
+
};
|
|
37
|
+
export declare const CoinPaymentClearingReference: import("scale-ts").Codec<{
|
|
38
|
+
root: `0x${string}`;
|
|
39
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
40
|
+
}>;
|
|
41
|
+
export declare const CoinPaymentStatus: import("scale-ts").Codec<{
|
|
42
|
+
tag: "Clearing";
|
|
43
|
+
value: {
|
|
44
|
+
clearing: number;
|
|
45
|
+
cleared: number;
|
|
46
|
+
};
|
|
47
|
+
} | {
|
|
48
|
+
tag: "Failed";
|
|
49
|
+
value: {
|
|
50
|
+
error: "Denied" | "BalanceLow" | "BadCoins" | "SnipedCoins" | "PurseNotFound" | "ReceivableNotFound" | "UnsupportedChannel" | "UserAgentCapabilityUnavailable" | "Internal";
|
|
51
|
+
cleared: number;
|
|
52
|
+
reference: {
|
|
53
|
+
root: `0x${string}`;
|
|
54
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
tag: "Done";
|
|
59
|
+
value: {
|
|
60
|
+
cleared: number;
|
|
61
|
+
reference: {
|
|
62
|
+
root: `0x${string}`;
|
|
63
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}>;
|
|
67
|
+
export declare const CoinPaymentTransmissionChannel: import("scale-ts").Codec<{
|
|
68
|
+
tag: "Standard";
|
|
69
|
+
value: {
|
|
70
|
+
sssTopic: `0x${string}`;
|
|
71
|
+
};
|
|
72
|
+
}>;
|
|
73
|
+
export declare const CoinPaymentListenForItem: import("scale-ts").Codec<{
|
|
74
|
+
tag: "Channel";
|
|
75
|
+
value: {
|
|
76
|
+
tag: "Standard";
|
|
77
|
+
value: {
|
|
78
|
+
sssTopic: `0x${string}`;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
} | {
|
|
82
|
+
tag: "Cheque";
|
|
83
|
+
value: {
|
|
84
|
+
id: `0x${string}`;
|
|
85
|
+
amount: number;
|
|
86
|
+
encryptedSecrets: `0x${string}`;
|
|
87
|
+
};
|
|
88
|
+
}>;
|
|
89
|
+
export declare const CoinPaymentCreatePurseV1_request: import("scale-ts").Codec<{
|
|
90
|
+
name: string;
|
|
91
|
+
}>;
|
|
92
|
+
export declare const CoinPaymentCreatePurseV1_response: import("scale-ts").Codec<import("../callError.js").CallResultValue<{
|
|
93
|
+
purse: number;
|
|
94
|
+
}, import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>>;
|
|
95
|
+
export declare const CoinPaymentQueryPurseV1_request: import("scale-ts").Codec<{
|
|
96
|
+
purse: number;
|
|
97
|
+
}>;
|
|
98
|
+
export declare const CoinPaymentQueryPurseV1_response: import("scale-ts").Codec<import("../callError.js").CallResultValue<{
|
|
99
|
+
info: {
|
|
100
|
+
name: string;
|
|
101
|
+
created: bigint;
|
|
102
|
+
creator: string;
|
|
103
|
+
balance: number;
|
|
104
|
+
};
|
|
105
|
+
}, import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>>;
|
|
106
|
+
export declare const CoinPaymentRebalancePurseV1_start: import("scale-ts").Codec<{
|
|
107
|
+
from: number;
|
|
108
|
+
to: number;
|
|
109
|
+
amount: number;
|
|
110
|
+
}>;
|
|
111
|
+
export declare const CoinPaymentRebalancePurseV1_receive: import("scale-ts").Codec<{
|
|
112
|
+
tag: "Clearing";
|
|
113
|
+
value: {
|
|
114
|
+
clearing: number;
|
|
115
|
+
cleared: number;
|
|
116
|
+
};
|
|
117
|
+
} | {
|
|
118
|
+
tag: "Failed";
|
|
119
|
+
value: {
|
|
120
|
+
error: "Denied" | "BalanceLow" | "BadCoins" | "SnipedCoins" | "PurseNotFound" | "ReceivableNotFound" | "UnsupportedChannel" | "UserAgentCapabilityUnavailable" | "Internal";
|
|
121
|
+
cleared: number;
|
|
122
|
+
reference: {
|
|
123
|
+
root: `0x${string}`;
|
|
124
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
} | {
|
|
128
|
+
tag: "Done";
|
|
129
|
+
value: {
|
|
130
|
+
cleared: number;
|
|
131
|
+
reference: {
|
|
132
|
+
root: `0x${string}`;
|
|
133
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
}>;
|
|
137
|
+
export declare const CoinPaymentRebalancePurseV1_interrupt: [import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>, import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>] & {
|
|
138
|
+
enc: import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
139
|
+
dec: import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
140
|
+
} & {
|
|
141
|
+
readonly BalanceLow: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BalanceLow">;
|
|
142
|
+
readonly Denied: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Denied">;
|
|
143
|
+
readonly BadCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BadCoins">;
|
|
144
|
+
readonly SnipedCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::SnipedCoins">;
|
|
145
|
+
readonly PurseNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::PurseNotFound">;
|
|
146
|
+
readonly ReceivableNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::ReceivableNotFound">;
|
|
147
|
+
readonly UnsupportedChannel: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UnsupportedChannel">;
|
|
148
|
+
readonly UserAgentCapabilityUnavailable: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable">;
|
|
149
|
+
readonly Internal: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Internal">;
|
|
150
|
+
} & {
|
|
151
|
+
[Symbol.hasInstance](v: unknown): v is import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">;
|
|
152
|
+
};
|
|
153
|
+
export declare const CoinPaymentDeletePurseV1_start: import("scale-ts").Codec<{
|
|
154
|
+
target: number;
|
|
155
|
+
drainInto: number;
|
|
156
|
+
}>;
|
|
157
|
+
export declare const CoinPaymentDeletePurseV1_receive: import("scale-ts").Codec<{
|
|
158
|
+
tag: "Clearing";
|
|
159
|
+
value: {
|
|
160
|
+
clearing: number;
|
|
161
|
+
cleared: number;
|
|
162
|
+
};
|
|
163
|
+
} | {
|
|
164
|
+
tag: "Failed";
|
|
165
|
+
value: {
|
|
166
|
+
error: "Denied" | "BalanceLow" | "BadCoins" | "SnipedCoins" | "PurseNotFound" | "ReceivableNotFound" | "UnsupportedChannel" | "UserAgentCapabilityUnavailable" | "Internal";
|
|
167
|
+
cleared: number;
|
|
168
|
+
reference: {
|
|
169
|
+
root: `0x${string}`;
|
|
170
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
} | {
|
|
174
|
+
tag: "Done";
|
|
175
|
+
value: {
|
|
176
|
+
cleared: number;
|
|
177
|
+
reference: {
|
|
178
|
+
root: `0x${string}`;
|
|
179
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
}>;
|
|
183
|
+
export declare const CoinPaymentDeletePurseV1_interrupt: [import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>, import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>] & {
|
|
184
|
+
enc: import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
185
|
+
dec: import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
186
|
+
} & {
|
|
187
|
+
readonly BalanceLow: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BalanceLow">;
|
|
188
|
+
readonly Denied: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Denied">;
|
|
189
|
+
readonly BadCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BadCoins">;
|
|
190
|
+
readonly SnipedCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::SnipedCoins">;
|
|
191
|
+
readonly PurseNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::PurseNotFound">;
|
|
192
|
+
readonly ReceivableNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::ReceivableNotFound">;
|
|
193
|
+
readonly UnsupportedChannel: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UnsupportedChannel">;
|
|
194
|
+
readonly UserAgentCapabilityUnavailable: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable">;
|
|
195
|
+
readonly Internal: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Internal">;
|
|
196
|
+
} & {
|
|
197
|
+
[Symbol.hasInstance](v: unknown): v is import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">;
|
|
198
|
+
};
|
|
199
|
+
export declare const CoinPaymentCreateReceivableV1_request: import("scale-ts").Codec<{
|
|
200
|
+
into: number;
|
|
201
|
+
}>;
|
|
202
|
+
export declare const CoinPaymentCreateReceivableV1_response: import("scale-ts").Codec<import("../callError.js").CallResultValue<{
|
|
203
|
+
receivable: `0x${string}`;
|
|
204
|
+
}, import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>>;
|
|
205
|
+
export declare const CoinPaymentCreateChequeV1_request: import("scale-ts").Codec<{
|
|
206
|
+
from: number;
|
|
207
|
+
to: `0x${string}`;
|
|
208
|
+
amount: number;
|
|
209
|
+
}>;
|
|
210
|
+
export declare const CoinPaymentCreateChequeV1_response: import("scale-ts").Codec<import("../callError.js").CallResultValue<{
|
|
211
|
+
cheque: {
|
|
212
|
+
id: `0x${string}`;
|
|
213
|
+
amount: number;
|
|
214
|
+
encryptedSecrets: `0x${string}`;
|
|
215
|
+
};
|
|
216
|
+
}, import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>>;
|
|
217
|
+
export declare const CoinPaymentDepositV1_start: import("scale-ts").Codec<{
|
|
218
|
+
cheque: {
|
|
219
|
+
id: `0x${string}`;
|
|
220
|
+
amount: number;
|
|
221
|
+
encryptedSecrets: `0x${string}`;
|
|
222
|
+
};
|
|
223
|
+
}>;
|
|
224
|
+
export declare const CoinPaymentDepositV1_receive: import("scale-ts").Codec<{
|
|
225
|
+
tag: "Clearing";
|
|
226
|
+
value: {
|
|
227
|
+
clearing: number;
|
|
228
|
+
cleared: number;
|
|
229
|
+
};
|
|
230
|
+
} | {
|
|
231
|
+
tag: "Failed";
|
|
232
|
+
value: {
|
|
233
|
+
error: "Denied" | "BalanceLow" | "BadCoins" | "SnipedCoins" | "PurseNotFound" | "ReceivableNotFound" | "UnsupportedChannel" | "UserAgentCapabilityUnavailable" | "Internal";
|
|
234
|
+
cleared: number;
|
|
235
|
+
reference: {
|
|
236
|
+
root: `0x${string}`;
|
|
237
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
} | {
|
|
241
|
+
tag: "Done";
|
|
242
|
+
value: {
|
|
243
|
+
cleared: number;
|
|
244
|
+
reference: {
|
|
245
|
+
root: `0x${string}`;
|
|
246
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
}>;
|
|
250
|
+
export declare const CoinPaymentDepositV1_interrupt: [import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>, import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>] & {
|
|
251
|
+
enc: import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
252
|
+
dec: import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
253
|
+
} & {
|
|
254
|
+
readonly BalanceLow: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BalanceLow">;
|
|
255
|
+
readonly Denied: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Denied">;
|
|
256
|
+
readonly BadCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BadCoins">;
|
|
257
|
+
readonly SnipedCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::SnipedCoins">;
|
|
258
|
+
readonly PurseNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::PurseNotFound">;
|
|
259
|
+
readonly ReceivableNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::ReceivableNotFound">;
|
|
260
|
+
readonly UnsupportedChannel: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UnsupportedChannel">;
|
|
261
|
+
readonly UserAgentCapabilityUnavailable: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable">;
|
|
262
|
+
readonly Internal: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Internal">;
|
|
263
|
+
} & {
|
|
264
|
+
[Symbol.hasInstance](v: unknown): v is import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">;
|
|
265
|
+
};
|
|
266
|
+
export declare const CoinPaymentRefundV1_start: import("scale-ts").Codec<{
|
|
267
|
+
receivable: `0x${string}`;
|
|
268
|
+
}>;
|
|
269
|
+
export declare const CoinPaymentRefundV1_receive: import("scale-ts").Codec<{
|
|
270
|
+
tag: "Clearing";
|
|
271
|
+
value: {
|
|
272
|
+
clearing: number;
|
|
273
|
+
cleared: number;
|
|
274
|
+
};
|
|
275
|
+
} | {
|
|
276
|
+
tag: "Failed";
|
|
277
|
+
value: {
|
|
278
|
+
error: "Denied" | "BalanceLow" | "BadCoins" | "SnipedCoins" | "PurseNotFound" | "ReceivableNotFound" | "UnsupportedChannel" | "UserAgentCapabilityUnavailable" | "Internal";
|
|
279
|
+
cleared: number;
|
|
280
|
+
reference: {
|
|
281
|
+
root: `0x${string}`;
|
|
282
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
} | {
|
|
286
|
+
tag: "Done";
|
|
287
|
+
value: {
|
|
288
|
+
cleared: number;
|
|
289
|
+
reference: {
|
|
290
|
+
root: `0x${string}`;
|
|
291
|
+
leaves: [`0x${string}`, `0x${string}`][];
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
}>;
|
|
295
|
+
export declare const CoinPaymentRefundV1_interrupt: [import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>, import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>] & {
|
|
296
|
+
enc: import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
297
|
+
dec: import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
298
|
+
} & {
|
|
299
|
+
readonly BalanceLow: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BalanceLow">;
|
|
300
|
+
readonly Denied: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Denied">;
|
|
301
|
+
readonly BadCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BadCoins">;
|
|
302
|
+
readonly SnipedCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::SnipedCoins">;
|
|
303
|
+
readonly PurseNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::PurseNotFound">;
|
|
304
|
+
readonly ReceivableNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::ReceivableNotFound">;
|
|
305
|
+
readonly UnsupportedChannel: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UnsupportedChannel">;
|
|
306
|
+
readonly UserAgentCapabilityUnavailable: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable">;
|
|
307
|
+
readonly Internal: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Internal">;
|
|
308
|
+
} & {
|
|
309
|
+
[Symbol.hasInstance](v: unknown): v is import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">;
|
|
310
|
+
};
|
|
311
|
+
export declare const CoinPaymentListenForPaymentV1_start: import("scale-ts").Codec<{
|
|
312
|
+
receivable: `0x${string}`;
|
|
313
|
+
}>;
|
|
314
|
+
export declare const CoinPaymentListenForPaymentV1_receive: import("scale-ts").Codec<{
|
|
315
|
+
tag: "Channel";
|
|
316
|
+
value: {
|
|
317
|
+
tag: "Standard";
|
|
318
|
+
value: {
|
|
319
|
+
sssTopic: `0x${string}`;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
} | {
|
|
323
|
+
tag: "Cheque";
|
|
324
|
+
value: {
|
|
325
|
+
id: `0x${string}`;
|
|
326
|
+
amount: number;
|
|
327
|
+
encryptedSecrets: `0x${string}`;
|
|
328
|
+
};
|
|
329
|
+
}>;
|
|
330
|
+
export declare const CoinPaymentListenForPaymentV1_interrupt: [import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>, import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>] & {
|
|
331
|
+
enc: import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
332
|
+
dec: import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">>;
|
|
333
|
+
} & {
|
|
334
|
+
readonly BalanceLow: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BalanceLow">;
|
|
335
|
+
readonly Denied: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Denied">;
|
|
336
|
+
readonly BadCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::BadCoins">;
|
|
337
|
+
readonly SnipedCoins: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::SnipedCoins">;
|
|
338
|
+
readonly PurseNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::PurseNotFound">;
|
|
339
|
+
readonly ReceivableNotFound: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::ReceivableNotFound">;
|
|
340
|
+
readonly UnsupportedChannel: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UnsupportedChannel">;
|
|
341
|
+
readonly UserAgentCapabilityUnavailable: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable">;
|
|
342
|
+
readonly Internal: import("@novasamatech/scale").ErrCodec<undefined, "CoinPaymentErr::Internal">;
|
|
343
|
+
} & {
|
|
344
|
+
[Symbol.hasInstance](v: unknown): v is import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Denied"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BalanceLow"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::BadCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::SnipedCoins"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::PurseNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::ReceivableNotFound"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UnsupportedChannel"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::UserAgentCapabilityUnavailable"> | import("@novasamatech/scale").CodecError<undefined, "CoinPaymentErr::Internal">;
|
|
345
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Enum, ErrEnum, Hex, Status } from '@novasamatech/scale';
|
|
2
|
+
import { Struct, Tuple, Vector, _void, str, u32, u64 } from 'scale-ts';
|
|
3
|
+
import { CallResult } from '../callError.js';
|
|
4
|
+
// RFC 0017 CoinPayment shared types.
|
|
5
|
+
// Purse identifier. `0xffffffff` (u32::MAX) is the well-known MAIN_PURSE.
|
|
6
|
+
export const CoinPaymentPurseId = u32;
|
|
7
|
+
export const CoinPaymentBalance = u32;
|
|
8
|
+
// Milliseconds since the Unix epoch.
|
|
9
|
+
export const CoinPaymentTimestamp = u64;
|
|
10
|
+
export const CoinPaymentProductId = str;
|
|
11
|
+
// Public key identifying a receivable, and the 32-byte clearing leaves.
|
|
12
|
+
export const CoinPaymentReceivable = Hex(32);
|
|
13
|
+
export const CoinPaymentMerkleRoot = Hex(32);
|
|
14
|
+
export const CoinPaymentTransactionHash = Hex(32);
|
|
15
|
+
export const CoinPaymentCoinagePubKey = Hex(32);
|
|
16
|
+
export const CoinPaymentPurseInfo = Struct({
|
|
17
|
+
name: str,
|
|
18
|
+
created: CoinPaymentTimestamp,
|
|
19
|
+
creator: CoinPaymentProductId,
|
|
20
|
+
balance: CoinPaymentBalance,
|
|
21
|
+
});
|
|
22
|
+
export const CoinPaymentCheque = Struct({
|
|
23
|
+
id: CoinPaymentReceivable,
|
|
24
|
+
amount: CoinPaymentBalance,
|
|
25
|
+
encryptedSecrets: Hex(),
|
|
26
|
+
});
|
|
27
|
+
// The nine CoinPaymentError variants, in wire order. Used as a plain value
|
|
28
|
+
// inside a clearing status; `CoinPaymentErr` below is the same set as a
|
|
29
|
+
// neverthrow error for the method and interrupt paths.
|
|
30
|
+
export const CoinPaymentErrorValue = Status('BalanceLow', 'Denied', 'BadCoins', 'SnipedCoins', 'PurseNotFound', 'ReceivableNotFound', 'UnsupportedChannel', 'UserAgentCapabilityUnavailable', 'Internal');
|
|
31
|
+
export const CoinPaymentErr = ErrEnum('CoinPaymentErr', {
|
|
32
|
+
BalanceLow: [_void, 'coin payment: source purse has too little balance'],
|
|
33
|
+
Denied: [_void, 'coin payment: user agent denied the operation'],
|
|
34
|
+
BadCoins: [_void, 'coin payment: coin secrets do not control valid coins'],
|
|
35
|
+
SnipedCoins: [_void, 'coin payment: coin secrets were claimed elsewhere'],
|
|
36
|
+
PurseNotFound: [_void, 'coin payment: purse not found'],
|
|
37
|
+
ReceivableNotFound: [_void, 'coin payment: receivable not found'],
|
|
38
|
+
UnsupportedChannel: [_void, 'coin payment: transmission channel not supported'],
|
|
39
|
+
UserAgentCapabilityUnavailable: [_void, 'coin payment: user agent capability unavailable'],
|
|
40
|
+
Internal: [_void, 'coin payment: internal error'],
|
|
41
|
+
});
|
|
42
|
+
export const CoinPaymentClearingReference = Struct({
|
|
43
|
+
root: CoinPaymentMerkleRoot,
|
|
44
|
+
leaves: Vector(Tuple(CoinPaymentCoinagePubKey, CoinPaymentTransactionHash)),
|
|
45
|
+
});
|
|
46
|
+
// Clearing status stream item shared by rebalance, delete, deposit, and refund.
|
|
47
|
+
export const CoinPaymentStatus = Enum({
|
|
48
|
+
Clearing: Struct({ clearing: CoinPaymentBalance, cleared: CoinPaymentBalance }),
|
|
49
|
+
Failed: Struct({
|
|
50
|
+
error: CoinPaymentErrorValue,
|
|
51
|
+
cleared: CoinPaymentBalance,
|
|
52
|
+
reference: CoinPaymentClearingReference,
|
|
53
|
+
}),
|
|
54
|
+
Done: Struct({ cleared: CoinPaymentBalance, reference: CoinPaymentClearingReference }),
|
|
55
|
+
});
|
|
56
|
+
export const CoinPaymentTransmissionChannel = Enum({
|
|
57
|
+
Standard: Struct({ sssTopic: Hex(32) }),
|
|
58
|
+
});
|
|
59
|
+
export const CoinPaymentListenForItem = Enum({
|
|
60
|
+
Channel: CoinPaymentTransmissionChannel,
|
|
61
|
+
Cheque: CoinPaymentCheque,
|
|
62
|
+
});
|
|
63
|
+
// host_coin_payment_create_purse (136)
|
|
64
|
+
export const CoinPaymentCreatePurseV1_request = Struct({ name: str });
|
|
65
|
+
export const CoinPaymentCreatePurseV1_response = CallResult(Struct({ purse: CoinPaymentPurseId }), CoinPaymentErr);
|
|
66
|
+
// host_coin_payment_query_purse (138)
|
|
67
|
+
export const CoinPaymentQueryPurseV1_request = Struct({ purse: CoinPaymentPurseId });
|
|
68
|
+
export const CoinPaymentQueryPurseV1_response = CallResult(Struct({ info: CoinPaymentPurseInfo }), CoinPaymentErr);
|
|
69
|
+
// host_coin_payment_rebalance_purse (140)
|
|
70
|
+
export const CoinPaymentRebalancePurseV1_start = Struct({
|
|
71
|
+
from: CoinPaymentPurseId,
|
|
72
|
+
to: CoinPaymentPurseId,
|
|
73
|
+
amount: CoinPaymentBalance,
|
|
74
|
+
});
|
|
75
|
+
export const CoinPaymentRebalancePurseV1_receive = CoinPaymentStatus;
|
|
76
|
+
export const CoinPaymentRebalancePurseV1_interrupt = CoinPaymentErr;
|
|
77
|
+
// host_coin_payment_delete_purse (144)
|
|
78
|
+
export const CoinPaymentDeletePurseV1_start = Struct({
|
|
79
|
+
target: CoinPaymentPurseId,
|
|
80
|
+
drainInto: CoinPaymentPurseId,
|
|
81
|
+
});
|
|
82
|
+
export const CoinPaymentDeletePurseV1_receive = CoinPaymentStatus;
|
|
83
|
+
export const CoinPaymentDeletePurseV1_interrupt = CoinPaymentErr;
|
|
84
|
+
// host_coin_payment_create_receivable (148)
|
|
85
|
+
export const CoinPaymentCreateReceivableV1_request = Struct({ into: CoinPaymentPurseId });
|
|
86
|
+
export const CoinPaymentCreateReceivableV1_response = CallResult(Struct({ receivable: CoinPaymentReceivable }), CoinPaymentErr);
|
|
87
|
+
// host_coin_payment_create_cheque (150)
|
|
88
|
+
export const CoinPaymentCreateChequeV1_request = Struct({
|
|
89
|
+
from: CoinPaymentPurseId,
|
|
90
|
+
to: CoinPaymentReceivable,
|
|
91
|
+
amount: CoinPaymentBalance,
|
|
92
|
+
});
|
|
93
|
+
export const CoinPaymentCreateChequeV1_response = CallResult(Struct({ cheque: CoinPaymentCheque }), CoinPaymentErr);
|
|
94
|
+
// host_coin_payment_deposit (152)
|
|
95
|
+
export const CoinPaymentDepositV1_start = Struct({ cheque: CoinPaymentCheque });
|
|
96
|
+
export const CoinPaymentDepositV1_receive = CoinPaymentStatus;
|
|
97
|
+
export const CoinPaymentDepositV1_interrupt = CoinPaymentErr;
|
|
98
|
+
// host_coin_payment_refund (156)
|
|
99
|
+
export const CoinPaymentRefundV1_start = Struct({ receivable: CoinPaymentReceivable });
|
|
100
|
+
export const CoinPaymentRefundV1_receive = CoinPaymentStatus;
|
|
101
|
+
export const CoinPaymentRefundV1_interrupt = CoinPaymentErr;
|
|
102
|
+
// host_coin_payment_listen_for_payment (160)
|
|
103
|
+
export const CoinPaymentListenForPaymentV1_start = Struct({ receivable: CoinPaymentReceivable });
|
|
104
|
+
export const CoinPaymentListenForPaymentV1_receive = CoinPaymentListenForItem;
|
|
105
|
+
export const CoinPaymentListenForPaymentV1_interrupt = CoinPaymentErr;
|
|
@@ -6,15 +6,15 @@ import type { Codec } from 'scale-ts';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const CreateTransactionErr: [import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
|
|
8
8
|
reason: string;
|
|
9
|
-
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<
|
|
9
|
+
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<string, "CreateTransactionErr::NotSupported"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::FailedToDecode">>, import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
|
|
10
10
|
reason: string;
|
|
11
|
-
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<
|
|
11
|
+
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<string, "CreateTransactionErr::NotSupported"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::FailedToDecode">>] & {
|
|
12
12
|
enc: import("scale-ts").Encoder<import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
|
|
13
13
|
reason: string;
|
|
14
|
-
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<
|
|
14
|
+
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<string, "CreateTransactionErr::NotSupported"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::FailedToDecode">>;
|
|
15
15
|
dec: import("scale-ts").Decoder<import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
|
|
16
16
|
reason: string;
|
|
17
|
-
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<
|
|
17
|
+
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<string, "CreateTransactionErr::NotSupported"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::FailedToDecode">>;
|
|
18
18
|
} & {
|
|
19
19
|
readonly FailedToDecode: import("@novasamatech/scale").ErrCodec<undefined, "CreateTransactionErr::FailedToDecode">;
|
|
20
20
|
readonly Rejected: import("@novasamatech/scale").ErrCodec<undefined, "CreateTransactionErr::Rejected">;
|
|
@@ -26,7 +26,7 @@ export declare const CreateTransactionErr: [import("scale-ts").Encoder<import("@
|
|
|
26
26
|
} & {
|
|
27
27
|
[Symbol.hasInstance](v: unknown): v is import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
|
|
28
28
|
reason: string;
|
|
29
|
-
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<
|
|
29
|
+
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<string, "CreateTransactionErr::NotSupported"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::FailedToDecode">;
|
|
30
30
|
};
|
|
31
31
|
export declare const TxPayloadExtensionV1: Codec<{
|
|
32
32
|
id: string;
|
|
@@ -78,9 +78,9 @@ export declare const CreateTransactionV1_request: Codec<{
|
|
|
78
78
|
}[];
|
|
79
79
|
txExtVersion: number;
|
|
80
80
|
}>;
|
|
81
|
-
export declare const CreateTransactionV1_response: Codec<import("
|
|
81
|
+
export declare const CreateTransactionV1_response: Codec<import("../callError.js").CallResultValue<Uint8Array<ArrayBufferLike>, import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
|
|
82
82
|
reason: string;
|
|
83
|
-
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<
|
|
83
|
+
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<string, "CreateTransactionErr::NotSupported"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::FailedToDecode">>>;
|
|
84
84
|
export declare const CreateTransactionWithLegacyAccountV1_request: Codec<{
|
|
85
85
|
signer: Uint8Array<ArrayBufferLike>;
|
|
86
86
|
genesisHash: `0x${string}`;
|
|
@@ -92,6 +92,6 @@ export declare const CreateTransactionWithLegacyAccountV1_request: Codec<{
|
|
|
92
92
|
}[];
|
|
93
93
|
txExtVersion: number;
|
|
94
94
|
}>;
|
|
95
|
-
export declare const CreateTransactionWithLegacyAccountV1_response: Codec<import("
|
|
95
|
+
export declare const CreateTransactionWithLegacyAccountV1_response: Codec<import("../callError.js").CallResultValue<Uint8Array<ArrayBufferLike>, import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::Rejected"> | import("@novasamatech/scale").CodecError<{
|
|
96
96
|
reason: string;
|
|
97
|
-
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<
|
|
97
|
+
}, "CreateTransactionErr::Unknown"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::PermissionDenied"> | import("@novasamatech/scale").CodecError<string, "CreateTransactionErr::NotSupported"> | import("@novasamatech/scale").CodecError<undefined, "CreateTransactionErr::FailedToDecode">>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Bytes, ErrEnum } from '@novasamatech/scale';
|
|
2
|
-
import {
|
|
2
|
+
import { Struct, Vector, _void, str, u8 } from 'scale-ts';
|
|
3
|
+
import { CallResult } from '../callError.js';
|
|
3
4
|
import { GenericErr, GenesisHash } from '../commonCodecs.js';
|
|
4
5
|
import { AccountId, ProductAccountId } from './accounts.js';
|
|
5
6
|
/**
|
|
@@ -62,6 +63,6 @@ function GenericTxPayloadV1(signer) {
|
|
|
62
63
|
export const ProductAccountTransaction = GenericTxPayloadV1(ProductAccountId);
|
|
63
64
|
export const LegacyTransaction = GenericTxPayloadV1(AccountId);
|
|
64
65
|
export const CreateTransactionV1_request = ProductAccountTransaction;
|
|
65
|
-
export const CreateTransactionV1_response =
|
|
66
|
+
export const CreateTransactionV1_response = CallResult(Bytes(), CreateTransactionErr);
|
|
66
67
|
export const CreateTransactionWithLegacyAccountV1_request = LegacyTransaction;
|
|
67
|
-
export const CreateTransactionWithLegacyAccountV1_response =
|
|
68
|
+
export const CreateTransactionWithLegacyAccountV1_response = CallResult(Bytes(), CreateTransactionErr);
|
|
@@ -20,6 +20,6 @@ export declare const DeriveEntropyErr: [import("scale-ts").Encoder<import("@nova
|
|
|
20
20
|
};
|
|
21
21
|
export declare const Entropy: import("@novasamatech/scale").BytesCodec<number>;
|
|
22
22
|
export declare const DeriveEntropyV1_request: import("@novasamatech/scale").BytesCodec<undefined>;
|
|
23
|
-
export declare const DeriveEntropyV1_response: import("scale-ts").Codec<import("
|
|
23
|
+
export declare const DeriveEntropyV1_response: import("scale-ts").Codec<import("../callError.js").CallResultValue<Uint8Array<ArrayBufferLike>, import("@novasamatech/scale").CodecError<{
|
|
24
24
|
reason: string;
|
|
25
25
|
}, "DeriveEntropyErr::Unknown">>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Bytes, ErrEnum } from '@novasamatech/scale';
|
|
2
|
-
import {
|
|
2
|
+
import { CallResult } from '../callError.js';
|
|
3
3
|
import { GenericErr } from '../commonCodecs.js';
|
|
4
4
|
// common structures
|
|
5
5
|
export const DeriveEntropyErr = ErrEnum('DeriveEntropyErr', {
|
|
@@ -8,4 +8,4 @@ export const DeriveEntropyErr = ErrEnum('DeriveEntropyErr', {
|
|
|
8
8
|
export const Entropy = Bytes(32);
|
|
9
9
|
// actions
|
|
10
10
|
export const DeriveEntropyV1_request = Bytes();
|
|
11
|
-
export const DeriveEntropyV1_response =
|
|
11
|
+
export const DeriveEntropyV1_response = CallResult(Entropy, DeriveEntropyErr);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const DevicePermission: import("scale-ts").Codec<"Notifications" | "Camera" | "Microphone" | "Bluetooth" | "NFC" | "Location" | "Clipboard" | "OpenUrl" | "Biometrics">;
|
|
2
2
|
export declare const DevicePermissionV1_request: import("scale-ts").Codec<"Notifications" | "Camera" | "Microphone" | "Bluetooth" | "NFC" | "Location" | "Clipboard" | "OpenUrl" | "Biometrics">;
|
|
3
|
-
export declare const DevicePermissionV1_response: import("scale-ts").Codec<import("
|
|
3
|
+
export declare const DevicePermissionV1_response: import("scale-ts").Codec<import("../callError.js").CallResultValue<boolean, import("@novasamatech/scale").CodecError<{
|
|
4
4
|
reason: string;
|
|
5
5
|
}, "GenericError">>>;
|