@dfinity/nns 0.1.6 → 0.1.7
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/cjs/index.cjs.js +869 -0
- package/dist/cjs/index.cjs.js.map +7 -0
- package/dist/esm/account_identifier.js +2 -0
- package/dist/esm/account_identifier.js.map +7 -0
- package/dist/esm/chunk-AAXRCEPL.js +2 -0
- package/dist/esm/chunk-AAXRCEPL.js.map +7 -0
- package/dist/esm/chunk-AV2V5I5D.js +10 -0
- package/dist/esm/chunk-AV2V5I5D.js.map +7 -0
- package/dist/esm/chunk-NR65YN67.js +14 -0
- package/dist/esm/chunk-NR65YN67.js.map +7 -0
- package/dist/esm/chunk-QXLTRMTU.js +832 -0
- package/dist/esm/chunk-QXLTRMTU.js.map +7 -0
- package/dist/esm/chunk-RKZCM7KO.js +4 -0
- package/dist/esm/chunk-RKZCM7KO.js.map +7 -0
- package/dist/esm/chunk-UJYSTOZE.js +2 -0
- package/dist/esm/chunk-UJYSTOZE.js.map +7 -0
- package/dist/esm/chunk-XN3QHASA.js +4 -0
- package/dist/esm/chunk-XN3QHASA.js.map +7 -0
- package/dist/esm/chunk-YXM7FYC5.js +2 -0
- package/dist/esm/chunk-YXM7FYC5.js.map +7 -0
- package/dist/esm/governance.js +2 -0
- package/dist/esm/governance.js.map +7 -0
- package/dist/esm/icp.js +2 -0
- package/dist/esm/icp.js.map +7 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/ledger.js +2 -0
- package/dist/esm/ledger.js.map +7 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -12
- package/dist/{account_identifier.d.ts → types/account_identifier.d.ts} +0 -0
- package/dist/{governance.d.ts → types/governance.d.ts} +0 -0
- package/dist/{icp.d.ts → types/icp.d.ts} +0 -0
- package/dist/{index.d.ts → types/index.d.ts} +1 -1
- package/dist/{ledger.d.ts → types/ledger.d.ts} +0 -0
- package/dist/{utils → types/utils}/proto.d.ts +0 -0
- package/package.json +37 -28
- package/candid/governance.certified.did +0 -12
- package/candid/governance.certified.idl.d.ts +0 -2
- package/candid/governance.certified.idl.js +0 -18
- package/candid/governance.did +0 -10
- package/candid/governance.idl.d.ts +0 -5
- package/candid/governance.idl.js +0 -18
- package/candid/governanceTypes.d.ts +0 -16
- package/dist/account_identifier.js +0 -95
- package/dist/governance.js +0 -55
- package/dist/icp.js +0 -65
- package/dist/ledger.js +0 -131
- package/dist/utils/proto.js +0 -59
- package/proto/base_types.proto +0 -60
- package/proto/base_types_pb.d.ts +0 -144
- package/proto/base_types_pb.js +0 -1142
- package/proto/ledger.proto +0 -277
- package/proto/ledger_pb.d.ts +0 -911
- package/proto/ledger_pb.js +0 -7151
package/dist/ledger.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LedgerCanister = exports.TxDuplicate = exports.TxCreatedInFuture = exports.TxTooOld = exports.InsufficientFunds = exports.BadFee = exports.InvalidSender = void 0;
|
|
4
|
-
const agent_1 = require("@dfinity/agent");
|
|
5
|
-
const principal_1 = require("@dfinity/principal");
|
|
6
|
-
const ledger_pb_1 = require("../proto/ledger_pb");
|
|
7
|
-
const icp_1 = require("./icp");
|
|
8
|
-
const proto_1 = require("./utils/proto");
|
|
9
|
-
const MAINNET_LEDGER_CANISTER_ID = principal_1.Principal.fromText("ryjl3-tyaaa-aaaaa-aaaba-cai");
|
|
10
|
-
class InvalidSender {
|
|
11
|
-
}
|
|
12
|
-
exports.InvalidSender = InvalidSender;
|
|
13
|
-
class BadFee {
|
|
14
|
-
}
|
|
15
|
-
exports.BadFee = BadFee;
|
|
16
|
-
class InsufficientFunds {
|
|
17
|
-
constructor(balance) {
|
|
18
|
-
this.balance = balance;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.InsufficientFunds = InsufficientFunds;
|
|
22
|
-
class TxTooOld {
|
|
23
|
-
constructor(allowed_window_secs) {
|
|
24
|
-
this.allowed_window_secs = allowed_window_secs;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.TxTooOld = TxTooOld;
|
|
28
|
-
class TxCreatedInFuture {
|
|
29
|
-
}
|
|
30
|
-
exports.TxCreatedInFuture = TxCreatedInFuture;
|
|
31
|
-
class TxDuplicate {
|
|
32
|
-
constructor(duplicateOf) {
|
|
33
|
-
this.duplicateOf = duplicateOf;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.TxDuplicate = TxDuplicate;
|
|
37
|
-
class LedgerCanister {
|
|
38
|
-
constructor(agent, canisterId, updateFetcher, queryFetcher) {
|
|
39
|
-
this.agent = agent;
|
|
40
|
-
this.canisterId = canisterId;
|
|
41
|
-
this.updateFetcher = updateFetcher;
|
|
42
|
-
this.queryFetcher = queryFetcher;
|
|
43
|
-
/**
|
|
44
|
-
* Returns the balance of the specified account identifier.
|
|
45
|
-
*
|
|
46
|
-
* If `certified` is true, the request is fetched as an update call, otherwise
|
|
47
|
-
* it is fetched using a query call.
|
|
48
|
-
*/
|
|
49
|
-
this.accountBalance = async (accountIdentifier, certified = true) => {
|
|
50
|
-
const callMethod = certified ? this.updateFetcher : this.queryFetcher;
|
|
51
|
-
const request = new ledger_pb_1.AccountBalanceRequest();
|
|
52
|
-
request.setAccount(accountIdentifier.toProto());
|
|
53
|
-
const responseBytes = await callMethod(this.agent, this.canisterId, "account_balance_pb", request.serializeBinary());
|
|
54
|
-
if (responseBytes instanceof Error) {
|
|
55
|
-
// An error is never expected from this endpoint.
|
|
56
|
-
throw Error;
|
|
57
|
-
}
|
|
58
|
-
return icp_1.ICP.fromE8s(BigInt(ledger_pb_1.ICPTs.deserializeBinary(new Uint8Array(responseBytes)).getE8s()));
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Transfer ICP from the caller to the destination `accountIdentifier`.
|
|
62
|
-
* Returns the index of the block containing the tx if it was successful.
|
|
63
|
-
*
|
|
64
|
-
* TODO: support remaining options (subaccounts, memos, etc.)
|
|
65
|
-
*/
|
|
66
|
-
this.transfer = async (to, amount, memo) => {
|
|
67
|
-
const request = new ledger_pb_1.SendRequest();
|
|
68
|
-
request.setTo(to.toProto());
|
|
69
|
-
const payment = new ledger_pb_1.Payment();
|
|
70
|
-
payment.setReceiverGets(amount.toProto());
|
|
71
|
-
request.setPayment(payment);
|
|
72
|
-
if (memo) {
|
|
73
|
-
const memo = new ledger_pb_1.Memo();
|
|
74
|
-
memo.setMemo(memo.toString());
|
|
75
|
-
request.setMemo(memo);
|
|
76
|
-
}
|
|
77
|
-
const responseBytes = await this.updateFetcher(this.agent, this.canisterId, "send_pb", request.serializeBinary());
|
|
78
|
-
if (responseBytes instanceof Error) {
|
|
79
|
-
if (responseBytes.message.includes("Reject code: 5")) {
|
|
80
|
-
// Match against the different error types.
|
|
81
|
-
// This string matching is fragile. It's a stop-gap solution until
|
|
82
|
-
// we migrate to the candid interface.
|
|
83
|
-
if (responseBytes.message.match(/Sending from (.*) is not allowed/)) {
|
|
84
|
-
return new InvalidSender();
|
|
85
|
-
}
|
|
86
|
-
{
|
|
87
|
-
const m = responseBytes.message.match(/transaction.*duplicate.* in block (\d+)/);
|
|
88
|
-
if (m && m.length > 1) {
|
|
89
|
-
return new TxDuplicate(BigInt(m[1]));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
{
|
|
93
|
-
const m = responseBytes.message.match(/debit account.*, current balance: (\d*(\.\d*)?)/);
|
|
94
|
-
if (m && m.length > 1) {
|
|
95
|
-
const balance = icp_1.ICP.fromString(m[1]);
|
|
96
|
-
if (balance instanceof icp_1.ICP) {
|
|
97
|
-
return new InsufficientFunds(balance);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (responseBytes.message.includes("is in future")) {
|
|
102
|
-
return new TxCreatedInFuture();
|
|
103
|
-
}
|
|
104
|
-
{
|
|
105
|
-
const m = responseBytes.message.match(/older than (\d+)/);
|
|
106
|
-
if (m && m.length > 1) {
|
|
107
|
-
return new TxTooOld(Number.parseInt(m[1]));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
// Unknown error. Throw as-is.
|
|
112
|
-
throw responseBytes;
|
|
113
|
-
}
|
|
114
|
-
// Successful tx. Return the block height.
|
|
115
|
-
return BigInt(ledger_pb_1.BlockHeight.deserializeBinary(responseBytes).getHeight());
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
static create(options = {}) {
|
|
119
|
-
return new LedgerCanister(options.agent ?? defaultAgent(), options.canisterId ?? MAINNET_LEDGER_CANISTER_ID, options.updateCallOverride ?? proto_1.updateCall, options.queryCallOverride ?? proto_1.queryCall);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
exports.LedgerCanister = LedgerCanister;
|
|
123
|
-
/**
|
|
124
|
-
* @returns The default agent to use. An agent that connects to mainnet with the anonymous identity.
|
|
125
|
-
*/
|
|
126
|
-
function defaultAgent() {
|
|
127
|
-
return new agent_1.HttpAgent({
|
|
128
|
-
host: "https://ic0.app",
|
|
129
|
-
identity: new agent_1.AnonymousIdentity(),
|
|
130
|
-
});
|
|
131
|
-
}
|
package/dist/utils/proto.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.queryCall = exports.updateCall = void 0;
|
|
4
|
-
const agent_1 = require("@dfinity/agent");
|
|
5
|
-
/**
|
|
6
|
-
* Submits an update call to the IC.
|
|
7
|
-
* @returns The (binary) response if the request succeeded, an error otherwise.
|
|
8
|
-
*/
|
|
9
|
-
const updateCall = async (agent, canisterId, methodName, arg) => {
|
|
10
|
-
const submitResponse = await agent.call(canisterId, {
|
|
11
|
-
methodName,
|
|
12
|
-
arg,
|
|
13
|
-
effectiveCanisterId: canisterId,
|
|
14
|
-
});
|
|
15
|
-
if (!submitResponse.response.ok) {
|
|
16
|
-
return Error([
|
|
17
|
-
"Call failed:",
|
|
18
|
-
` Method: ${methodName}`,
|
|
19
|
-
` Canister ID: ${canisterId}`,
|
|
20
|
-
` Request ID: ${submitResponse.requestId}`,
|
|
21
|
-
` HTTP status code: ${submitResponse.response.status}`,
|
|
22
|
-
` HTTP status text: ${submitResponse.response.statusText}`,
|
|
23
|
-
].join("\n"));
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
const blob = await agent_1.polling.pollForResponse(agent, canisterId, submitResponse.requestId, agent_1.polling.defaultStrategy());
|
|
27
|
-
return new Uint8Array(blob);
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
if (err instanceof Error) {
|
|
31
|
-
// Return errors rather than throw them so that callers are forced to handle them.
|
|
32
|
-
return err;
|
|
33
|
-
}
|
|
34
|
-
// Something very wrong happened, and we don't know how to deal with it. Throw as-is.
|
|
35
|
-
throw err;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.updateCall = updateCall;
|
|
39
|
-
/**
|
|
40
|
-
* Submits a query call to the IC.
|
|
41
|
-
* @returns The (binary) response if the request succeeded, an error otherwise.
|
|
42
|
-
*/
|
|
43
|
-
const queryCall = async (agent, canisterId, methodName, arg) => {
|
|
44
|
-
const queryResponse = await agent.query(canisterId, {
|
|
45
|
-
methodName,
|
|
46
|
-
arg,
|
|
47
|
-
});
|
|
48
|
-
if (queryResponse.status == "rejected" /* Rejected */) {
|
|
49
|
-
return new Error([
|
|
50
|
-
"Call failed:",
|
|
51
|
-
` Method: ${methodName}`,
|
|
52
|
-
` Canister ID: ${canisterId}`,
|
|
53
|
-
` HTTP status code: ${queryResponse.reject_code}`,
|
|
54
|
-
` HTTP status text: ${queryResponse.reject_message}`,
|
|
55
|
-
].join("\n"));
|
|
56
|
-
}
|
|
57
|
-
return new Uint8Array(queryResponse.reply.arg);
|
|
58
|
-
};
|
|
59
|
-
exports.queryCall = queryCall;
|
package/proto/base_types.proto
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package ic_base_types.pb.v1;
|
|
4
|
-
|
|
5
|
-
import "google/protobuf/descriptor.proto";
|
|
6
|
-
|
|
7
|
-
// The annotated message is supported by hardware wallet signing.
|
|
8
|
-
// The numbering was chosen as the range 19000-19999 is anyway reserved in protobuf.
|
|
9
|
-
extend google.protobuf.MessageOptions {
|
|
10
|
-
bool tui_signed_message = 20000;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// The annotated field is displayed on the hardware wallet in the specification
|
|
14
|
-
// used by launch of the Internet Computer.
|
|
15
|
-
extend google.protobuf.FieldOptions {
|
|
16
|
-
bool tui_signed_display_q2_2021 = 20001;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// A PB container for a PrincipalId, which uniquely identifies
|
|
20
|
-
// a principal.
|
|
21
|
-
message PrincipalId {
|
|
22
|
-
option (tui_signed_message) = true;
|
|
23
|
-
bytes serialized_id = 1 [(tui_signed_display_q2_2021) = true];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// A PB container for a CanisterId, which uniquely identifies
|
|
27
|
-
// a principal.
|
|
28
|
-
message CanisterId {
|
|
29
|
-
bytes serialized_id = 1;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// A container for a NeuronId blob, which uniquely identifies
|
|
33
|
-
// a Neuron.
|
|
34
|
-
message NeuronId {
|
|
35
|
-
option (ic_base_types.pb.v1.tui_signed_message) = true;
|
|
36
|
-
// bytes serialized_id = 1;
|
|
37
|
-
reserved 1;
|
|
38
|
-
reserved 'serialized_id';
|
|
39
|
-
uint64 id = 2 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true, jstype = JS_STRING];;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// The id of a specific proposal.
|
|
43
|
-
message ProposalId {
|
|
44
|
-
uint64 id = 1 [jstype = JS_STRING];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// A descriptor of the authorization of a single method.
|
|
48
|
-
// Any of the principals in the list are authorized to execute
|
|
49
|
-
// the method.
|
|
50
|
-
message MethodAuthzInfo {
|
|
51
|
-
string method_name = 1;
|
|
52
|
-
repeated bytes principal_ids = 2;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// A descriptor of the authorization of all the update methods in a
|
|
56
|
-
// canister that require authorization.
|
|
57
|
-
// Methods that should be accessible to anyone should not appear in this list
|
|
58
|
-
message CanisterAuthzInfo {
|
|
59
|
-
repeated MethodAuthzInfo methods_authz = 1;
|
|
60
|
-
}
|
package/proto/base_types_pb.d.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
// package: ic_base_types.pb.v1
|
|
2
|
-
// file: proto/base_types.proto
|
|
3
|
-
|
|
4
|
-
import * as jspb from "google-protobuf";
|
|
5
|
-
import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
|
|
6
|
-
|
|
7
|
-
export class PrincipalId extends jspb.Message {
|
|
8
|
-
getSerializedId(): Uint8Array | string;
|
|
9
|
-
getSerializedId_asU8(): Uint8Array;
|
|
10
|
-
getSerializedId_asB64(): string;
|
|
11
|
-
setSerializedId(value: Uint8Array | string): void;
|
|
12
|
-
|
|
13
|
-
serializeBinary(): Uint8Array;
|
|
14
|
-
toObject(includeInstance?: boolean): PrincipalId.AsObject;
|
|
15
|
-
static toObject(includeInstance: boolean, msg: PrincipalId): PrincipalId.AsObject;
|
|
16
|
-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
17
|
-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
18
|
-
static serializeBinaryToWriter(message: PrincipalId, writer: jspb.BinaryWriter): void;
|
|
19
|
-
static deserializeBinary(bytes: Uint8Array): PrincipalId;
|
|
20
|
-
static deserializeBinaryFromReader(message: PrincipalId, reader: jspb.BinaryReader): PrincipalId;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export namespace PrincipalId {
|
|
24
|
-
export type AsObject = {
|
|
25
|
-
serializedId: Uint8Array | string,
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export class CanisterId extends jspb.Message {
|
|
30
|
-
getSerializedId(): Uint8Array | string;
|
|
31
|
-
getSerializedId_asU8(): Uint8Array;
|
|
32
|
-
getSerializedId_asB64(): string;
|
|
33
|
-
setSerializedId(value: Uint8Array | string): void;
|
|
34
|
-
|
|
35
|
-
serializeBinary(): Uint8Array;
|
|
36
|
-
toObject(includeInstance?: boolean): CanisterId.AsObject;
|
|
37
|
-
static toObject(includeInstance: boolean, msg: CanisterId): CanisterId.AsObject;
|
|
38
|
-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
39
|
-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
40
|
-
static serializeBinaryToWriter(message: CanisterId, writer: jspb.BinaryWriter): void;
|
|
41
|
-
static deserializeBinary(bytes: Uint8Array): CanisterId;
|
|
42
|
-
static deserializeBinaryFromReader(message: CanisterId, reader: jspb.BinaryReader): CanisterId;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export namespace CanisterId {
|
|
46
|
-
export type AsObject = {
|
|
47
|
-
serializedId: Uint8Array | string,
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export class NeuronId extends jspb.Message {
|
|
52
|
-
getId(): string;
|
|
53
|
-
setId(value: string): void;
|
|
54
|
-
|
|
55
|
-
serializeBinary(): Uint8Array;
|
|
56
|
-
toObject(includeInstance?: boolean): NeuronId.AsObject;
|
|
57
|
-
static toObject(includeInstance: boolean, msg: NeuronId): NeuronId.AsObject;
|
|
58
|
-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
59
|
-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
60
|
-
static serializeBinaryToWriter(message: NeuronId, writer: jspb.BinaryWriter): void;
|
|
61
|
-
static deserializeBinary(bytes: Uint8Array): NeuronId;
|
|
62
|
-
static deserializeBinaryFromReader(message: NeuronId, reader: jspb.BinaryReader): NeuronId;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export namespace NeuronId {
|
|
66
|
-
export type AsObject = {
|
|
67
|
-
id: string,
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export class ProposalId extends jspb.Message {
|
|
72
|
-
getId(): string;
|
|
73
|
-
setId(value: string): void;
|
|
74
|
-
|
|
75
|
-
serializeBinary(): Uint8Array;
|
|
76
|
-
toObject(includeInstance?: boolean): ProposalId.AsObject;
|
|
77
|
-
static toObject(includeInstance: boolean, msg: ProposalId): ProposalId.AsObject;
|
|
78
|
-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
79
|
-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
80
|
-
static serializeBinaryToWriter(message: ProposalId, writer: jspb.BinaryWriter): void;
|
|
81
|
-
static deserializeBinary(bytes: Uint8Array): ProposalId;
|
|
82
|
-
static deserializeBinaryFromReader(message: ProposalId, reader: jspb.BinaryReader): ProposalId;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export namespace ProposalId {
|
|
86
|
-
export type AsObject = {
|
|
87
|
-
id: string,
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export class MethodAuthzInfo extends jspb.Message {
|
|
92
|
-
getMethodName(): string;
|
|
93
|
-
setMethodName(value: string): void;
|
|
94
|
-
|
|
95
|
-
clearPrincipalIdsList(): void;
|
|
96
|
-
getPrincipalIdsList(): Array<Uint8Array | string>;
|
|
97
|
-
getPrincipalIdsList_asU8(): Array<Uint8Array>;
|
|
98
|
-
getPrincipalIdsList_asB64(): Array<string>;
|
|
99
|
-
setPrincipalIdsList(value: Array<Uint8Array | string>): void;
|
|
100
|
-
addPrincipalIds(value: Uint8Array | string, index?: number): Uint8Array | string;
|
|
101
|
-
|
|
102
|
-
serializeBinary(): Uint8Array;
|
|
103
|
-
toObject(includeInstance?: boolean): MethodAuthzInfo.AsObject;
|
|
104
|
-
static toObject(includeInstance: boolean, msg: MethodAuthzInfo): MethodAuthzInfo.AsObject;
|
|
105
|
-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
106
|
-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
107
|
-
static serializeBinaryToWriter(message: MethodAuthzInfo, writer: jspb.BinaryWriter): void;
|
|
108
|
-
static deserializeBinary(bytes: Uint8Array): MethodAuthzInfo;
|
|
109
|
-
static deserializeBinaryFromReader(message: MethodAuthzInfo, reader: jspb.BinaryReader): MethodAuthzInfo;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export namespace MethodAuthzInfo {
|
|
113
|
-
export type AsObject = {
|
|
114
|
-
methodName: string,
|
|
115
|
-
principalIdsList: Array<Uint8Array | string>,
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export class CanisterAuthzInfo extends jspb.Message {
|
|
120
|
-
clearMethodsAuthzList(): void;
|
|
121
|
-
getMethodsAuthzList(): Array<MethodAuthzInfo>;
|
|
122
|
-
setMethodsAuthzList(value: Array<MethodAuthzInfo>): void;
|
|
123
|
-
addMethodsAuthz(value?: MethodAuthzInfo, index?: number): MethodAuthzInfo;
|
|
124
|
-
|
|
125
|
-
serializeBinary(): Uint8Array;
|
|
126
|
-
toObject(includeInstance?: boolean): CanisterAuthzInfo.AsObject;
|
|
127
|
-
static toObject(includeInstance: boolean, msg: CanisterAuthzInfo): CanisterAuthzInfo.AsObject;
|
|
128
|
-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
129
|
-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
130
|
-
static serializeBinaryToWriter(message: CanisterAuthzInfo, writer: jspb.BinaryWriter): void;
|
|
131
|
-
static deserializeBinary(bytes: Uint8Array): CanisterAuthzInfo;
|
|
132
|
-
static deserializeBinaryFromReader(message: CanisterAuthzInfo, reader: jspb.BinaryReader): CanisterAuthzInfo;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export namespace CanisterAuthzInfo {
|
|
136
|
-
export type AsObject = {
|
|
137
|
-
methodsAuthzList: Array<MethodAuthzInfo.AsObject>,
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export const tuiSignedMessage: jspb.ExtensionFieldInfo<boolean>;
|
|
142
|
-
|
|
143
|
-
export const tuiSignedDisplayQ22021: jspb.ExtensionFieldInfo<boolean>;
|
|
144
|
-
|